#ifndef __CE_GFX_VERTEXDECLARATION_H__
#define __CE_GFX_VERTEXDECLARATION_H__

#include <export.h>
#include <iobject.h>
#include <gfx/enum.h>
#include <gfx/programparametername.h>

/**
 * \addtogroup graphics
 * @{
 */

/**
 * @brief One element within the entire vertex declaration
 */
struct CE_API ceVertexElement
{
	ceProgramParameterName		Name;
	ceDataType								Type;
	unsigned                  Size;
	unsigned                  Offset;
	unsigned                  Stride;
	unsigned                  Stream;

	ceVertexElement(ceProgramParameterName name = ceProgramParameterName(), ceDataType type = DT_Float, unsigned size = 0, unsigned offset = 0, unsigned stride = 0, unsigned stream = 0)
		: Name(name)
		, Type (type)
		, Size (size)
		, Offset (offset)
		, Stride (stride)
		, Stream (stream)
	{

	}

};

/**
 * @brief Interface for controlling how the vertex data should be passed into the shading system.
 */
struct iVertexDeclaration : public iObject
{
	virtual unsigned GetNumberOfStreams () const = 0;
	virtual const ceVertexElement* GetElements (unsigned stream) const = 0;
	virtual const ceVertexElement* GetElement (ceProgramParameterName name, unsigned stream) const = 0;
	virtual unsigned GetTotalSize () const = 0;
};

/** @} */

#endif /* ! __CE_GFX_VERTEXDECLARATION_H__ */
